//
//  UILabel+UILableNightMode.m
//  Topit
//
//  Created by dllo on 15/12/16.
//  Copyright © 2015年 YXY. All rights reserved.
//

#import "UILabel+UILableNightMode.h"

@implementation UILabel (UILableNightMode)

- (void)nightMode {
    NSUserDefaults *user = [NSUserDefaults standardUserDefaults];
    NSString *mode = [user objectForKey:@"NightMode"];
    if ([mode isEqualToString:@"Night"]) {
     if (self.textColor == [UIColor blackColor]) {
            self.textColor = [UIColor whiteColor];
        }else if (self.textColor == [UIColor grayColor]) {
            self.textColor = [UIColor yellowColor];
        }
    }else {
      if (self.textColor == [UIColor whiteColor]) {
            self.textColor = [UIColor blackColor];
        }else if (self.textColor == [UIColor yellowColor]) {
            self.textColor = [UIColor grayColor];
        }
    }
}
@end
